#pragma once

#include "../umlmodel_global.h"

#include "../umlcore/JsonSerializable.h"

namespace uml {

/// <summary>
/// Dimension
/// Dimension specifies two lengths (width and height) along the x and y axes in
/// some x-y coordinate system.
/// </summary>
class UMLMODEL_EXPORT Dimension : public JsonSerializable {

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// width getter
    /// a real number (>=0) that represents a length along the x-axis.
    /// </summary>
    double width() const;

    /// <summary>
    /// width setter
    /// a real number (>=0) that represents a length along the x-axis.
    /// </summary>
    void setWidth(double value);

    /// <summary>
    /// height getter
    /// a real number (>=0) that represents a length along the y-axis.
    /// </summary>
    double height() const;

    /// <summary>
    /// height setter
    /// a real number (>=0) that represents a length along the y-axis.
    /// </summary>
    void setHeight(double value);

private: // Fields
    /// <summary>
    /// width
    /// a real number (>=0) that represents a length along the x-axis.
    /// </summary>
    const static double width_default_;
    double width_= width_default_;

    /// <summary>
    /// height
    /// a real number (>=0) that represents a length along the y-axis.
    /// </summary>
    const static double height_default_;
    double height_= height_default_;

};

} // namespace uml
